local assets =
{
    Asset("ANIM", "anim/bboy_nether_petal.zip"),
}

local prefabs = {}

local function fn()
    local inst = CreateEntity()

    inst.entity:AddTransform()
    inst.entity:AddAnimState()
    inst.entity:AddNetwork()

    MakeInventoryPhysics(inst)

    inst.AnimState:SetBank("bboy_nether_petal")
    inst.AnimState:SetBuild("bboy_nether_petal")
    inst.AnimState:PlayAnimation("idle")

    inst.pickupsound = "vegetation_grassy"

    inst:AddTag("cattoy")
    inst:AddTag("vasedecoration")
    inst:AddTag("bboy_nether_petal")

    MakeInventoryFloatable(inst)

    inst.entity:SetPristine()
    if not TheWorld.ismastersim then
        return inst
    end

    --
    local edible = inst:AddComponent("edible")
    edible.healthvalue = TUNING.HEALING_TINY
    edible.hungervalue = 0
    edible.foodtype = FOODTYPE.VEGGIE

    --
    inst:AddComponent("fuel")
    inst.components.fuel.fuelvalue = TUNING.TINY_FUEL

    --
    inst:AddComponent("inspectable")

    --
    inst:AddComponent("inventoryitem")

    --
    local perishable = inst:AddComponent("perishable")
    perishable:SetPerishTime(TUNING.PERISH_FAST)
    perishable:StartPerishing()
    perishable.onperishreplacement = "spoiled_food"

    --
    inst:AddComponent("stackable")
    inst.components.stackable.maxsize = TUNING.STACK_SIZE_SMALLITEM

    --
    inst:AddComponent("tradable")

    inst:AddComponent("bboy_upgrade")

    MakeSmallBurnable(inst, TUNING.TINY_BURNTIME)
    MakeSmallPropagator(inst)

    MakeHauntableLaunchAndPerish(inst)

    return inst
end

return Prefab("bboy_nether_petal", fn, assets, prefabs)
